# Contributor: ScrumpyJack <scrumpyjack@st.ilet.to>
# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=nmh
pkgver=1.8
pkgrel=1
pkgdesc="Powerful electronic mail handling system"
url="https://www.nongnu.org/nmh/"
arch="all"
license="BSD-3-Clause"
makedepends="
	gdbm-dev
	gnutls-dev
	ncurses-dev
	openssl-dev
	readline-dev
	"
checkdepends="
	cmd:locale
	cmd:lzma
	cmd:tput
	"
subpackages="$pkgname-doc"
source="https://download.savannah.nongnu.org/releases/nmh/nmh-$pkgver.tar.gz"

build() {
	# strcasestr
	CFLAGS="$CFLAGS -D_GNU_SOURCE" \
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--with-readline \
		--with-tls
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
12fc28d6a11da9e5a7d0ec1ca2811906ccdecdace94c06e17825d0029f6fbd1e5e1b81e82fe991ba1b7f8f045c2b60007473de0e2387e96d19262e94f0cafbf6  nmh-1.8.tar.gz
"
